using System;
using System.Data;
using System.Collections.Generic;
namespace eTMS.DAO{
	/********************************BEGIN SinhVienNhapHocDAOBase****************************************/
	///<summary>
	/// <para>Author: Auto generated class by CSharp Code Generator v2.0</para>
	/// <para>Date:07/08/2010 25:01:52</para>
	/// <para>Class Name: SinhVienNhapHocDAOBase</para>
	/// <para>Description: Class access to table SinhVienNhapHoc in database. Coder should'nt code here.</para>
	///</summary>

	
	public partial class SinhVienNhapHocDAO : ADOBase.DAOBase<SinhVienNhapHocEntity>{


		#region Select functions
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: CreateSelectOneCommand</para>
		/// <para>Input: SinhVienNhapHoc_ID</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateSelectOneCommand(int SinhVienNhapHoc_ID){
			string strSQL="SELECT  [SinhVienNhapHoc_ID],[SinhVien_ID],[NganhHoc_ID],[KhoaHoc_ID] FROM [SinhVienNhapHoc]  WHERE [SinhVienNhapHoc].[SinhVienNhapHoc_ID]=@SinhVienNhapHoc_ID";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			this.CreateCommandParameter(cmd,"@SinhVienNhapHoc_ID",SinhVienNhapHoc_ID);



			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: SelectOne</para>
		/// <para>Input: SinhVienNhapHoc_ID</para>
		/// <para>Output: SinhVienNhapHocEntity</para>
		///</summary>
		public SinhVienNhapHocEntity SelectOne(int SinhVienNhapHoc_ID){
			IDbCommand cmd=this.CreateSelectOneCommand(SinhVienNhapHoc_ID);
			return this.Select(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: CreateSelectAllCommand</para>
		/// <para>Input: </para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateSelectAllCommand(){
			string strSQL="SELECT  [SinhVienNhapHoc_ID],[SinhVien_ID],[NganhHoc_ID],[KhoaHoc_ID] FROM [SinhVienNhapHoc] ";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: CreateSelectAllByKeyCommand</para>
		/// <para>Input: ColumnName,ColumnValue</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateSelectAllByKeyCommand(string ColumnName,object Value){
			string strSQL="SELECT  [SinhVienNhapHoc_ID],[SinhVien_ID],[NganhHoc_ID],[KhoaHoc_ID] FROM [SinhVienNhapHoc]  WHERE [SinhVienNhapHoc].["+ColumnName+"]=@ColumnName";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			this.CreateCommandParameter(cmd,"@ColumnName",Value);



			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: SelectAll</para>
		/// <para>Input: </para>
		/// <para>Output: List of SinhVienNhapHocEntity</para>
		///</summary>
		public List<SinhVienNhapHocEntity> SelectAll(){
			IDbCommand cmd=this.CreateSelectAllCommand();
			return this.SelectList(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: SelectAllDS</para>
		/// <para>Input: </para>
		/// <para>Output: DataSet</para>
		///</summary>
		public DataSet SelectAllDS(){
			IDbCommand cmd=this.CreateSelectAllCommand();
			return this.SelectDS(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: CreateSelectAllFilterCommand</para>
		/// <para>Input: </para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateSelectAllFilterCommand(string strFilter){
			string strSQL="SELECT  [SinhVienNhapHoc_ID],[SinhVien_ID],[NganhHoc_ID],[KhoaHoc_ID] FROM [SinhVienNhapHoc]  WHERE "+RemoveInjection(strFilter);
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: CreateSelectAllByKeyFilterCommand</para>
		/// <para>Input: ColumnName,ColumnValue</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateSelectAllByKeyFilterCommand(string strFilter,string ColumnName,object Value){
			string strSQL="SELECT  [SinhVienNhapHoc_ID],[SinhVien_ID],[NganhHoc_ID],[KhoaHoc_ID] FROM [SinhVienNhapHoc]  WHERE [SinhVienNhapHoc].["+ColumnName+"]=@ColumnName AND "+RemoveInjection(strFilter);
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			this.CreateCommandParameter(cmd,"@ColumnName",Value);



			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: SelectAll</para>
		/// <para>Input: </para>
		/// <para>Output: List of SinhVienNhapHocEntity</para>
		///</summary>
		public List<SinhVienNhapHocEntity> SelectAllFilter(string strFilter){
			IDbCommand cmd=this.CreateSelectAllFilterCommand(strFilter);
			return this.SelectList(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: SelectAllDSFilter</para>
		/// <para>Input: </para>
		/// <para>Output: DataSet</para>
		///</summary>
		public DataSet SelectAllDSFilter(string strFilter){
			IDbCommand cmd=this.CreateSelectAllFilterCommand(strFilter);
			return this.SelectDS(cmd);
		}
		#endregion

		#region Insert functions
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: CreateInsertCommand</para>
		/// <para>Input: SinhVienNhapHocEntity</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateInsertCommand(SinhVienNhapHocEntity o){
			string strSQL="INSERT INTO [SinhVienNhapHoc]([SinhVien_ID],[NganhHoc_ID],[KhoaHoc_ID]) VALUES  (@SinhVien_ID,@NganhHoc_ID,@KhoaHoc_ID);SELECT  @@IDENTITY";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			if(o.IsNullSinhVien_ID)
				this.CreateCommandParameter(cmd,"@SinhVien_ID",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@SinhVien_ID",o.SinhVien_ID);

			if(o.IsNullNganhHoc_ID)
				this.CreateCommandParameter(cmd,"@NganhHoc_ID",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@NganhHoc_ID",o.NganhHoc_ID);

			if(o.IsNullKhoaHoc_ID)
				this.CreateCommandParameter(cmd,"@KhoaHoc_ID",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@KhoaHoc_ID",o.KhoaHoc_ID);


			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: Save</para>
		/// <para>Input: SinhVienNhapHocEntity</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool Save(SinhVienNhapHocEntity o){
			bool result=false;
			IDbCommand cmd=this.CreateInsertCommand(o);
			object id=this.ExecuteScalar(cmd,ref result);
			cmd.Dispose();
			try{
				o.SinhVienNhapHoc_ID=int.Parse(Convert.ToString(id));
			}
			catch{}
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: SaveList</para>
		/// <para>Input: List of SinhVienNhapHocEntity</para>
		/// <para>Output: </para>
		///</summary>
		public void SaveList(List<SinhVienNhapHocEntity>list){
			foreach(SinhVienNhapHocEntity o in list){
				try{
					this.Save(o);
				}
				catch{
				}
			}
		}
		#endregion

		#region Update functions
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: CreateUpdateCommand</para>
		/// <para>Input: SinhVienNhapHocEntity</para>
		/// <para>Output: </para>
		///</summary>
		protected IDbCommand CreateUpdateCommand(SinhVienNhapHocEntity o){
			string strSQL="UPDATE  [SinhVienNhapHoc] SET [SinhVienNhapHoc].[SinhVien_ID]=@SinhVien_ID,[SinhVienNhapHoc].[NganhHoc_ID]=@NganhHoc_ID,[SinhVienNhapHoc].[KhoaHoc_ID]=@KhoaHoc_ID WHERE [SinhVienNhapHoc].[SinhVienNhapHoc_ID]=@SinhVienNhapHoc_ID";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			if(o.IsNullSinhVienNhapHoc_ID)
				this.CreateCommandParameter(cmd,"@SinhVienNhapHoc_ID",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@SinhVienNhapHoc_ID",o.SinhVienNhapHoc_ID);

			if(o.IsNullSinhVien_ID)
				this.CreateCommandParameter(cmd,"@SinhVien_ID",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@SinhVien_ID",o.SinhVien_ID);

			if(o.IsNullNganhHoc_ID)
				this.CreateCommandParameter(cmd,"@NganhHoc_ID",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@NganhHoc_ID",o.NganhHoc_ID);

			if(o.IsNullKhoaHoc_ID)
				this.CreateCommandParameter(cmd,"@KhoaHoc_ID",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@KhoaHoc_ID",o.KhoaHoc_ID);


			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: CreateUpdateFieldCommand</para>
		/// <para>Input: ColumnName,ColumnValue,SinhVienNhapHoc_ID</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateUpdateFieldCommand(string ColumnName,object Value,int SinhVienNhapHoc_ID){
			string strSQL="UPDATE  [SinhVienNhapHoc] SET [SinhVienNhapHoc].["+ColumnName+"]=@ColumnName WHERE [SinhVienNhapHoc].[SinhVienNhapHoc_ID]=@SinhVienNhapHoc_ID";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			this.CreateCommandParameter(cmd,"@SinhVienNhapHoc_ID",SinhVienNhapHoc_ID);



			this.CreateCommandParameter(cmd,"@ColumnName",Value);


			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: Update</para>
		/// <para>Input: SinhVienNhapHocEntity</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool Update(SinhVienNhapHocEntity o){
			IDbCommand cmd=this.CreateUpdateCommand(o);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: UpdateList</para>
		/// <para>Input: List of SinhVienNhapHocEntity</para>
		/// <para>Output: </para>
		///</summary>
		public void UpdateList(List<SinhVienNhapHocEntity>list){
			foreach(SinhVienNhapHocEntity o in list){
				try{
					this.Update(o);
				}
				catch{
				}
			}
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: UpdateSinhVien_ID</para>
		/// <para>Input: NewSinhVien_ID,SinhVienNhapHoc_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateSinhVien_ID(int NewSinhVien_ID,int SinhVienNhapHoc_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("SinhVien_ID",NewSinhVien_ID,SinhVienNhapHoc_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: UpdateNganhHoc_ID</para>
		/// <para>Input: NewNganhHoc_ID,SinhVienNhapHoc_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateNganhHoc_ID(int NewNganhHoc_ID,int SinhVienNhapHoc_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("NganhHoc_ID",NewNganhHoc_ID,SinhVienNhapHoc_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: UpdateKhoaHoc_ID</para>
		/// <para>Input: NewKhoaHoc_ID,SinhVienNhapHoc_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateKhoaHoc_ID(int NewKhoaHoc_ID,int SinhVienNhapHoc_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("KhoaHoc_ID",NewKhoaHoc_ID,SinhVienNhapHoc_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		#endregion

		#region Delete functions
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: DeleteAllCommand</para>
		/// <para>Input: </para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateDeleteAllCommand(){
			string strSQL="DELETE   FROM [SinhVienNhapHoc]  ";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: DeleteCommand</para>
		/// <para>Input: SinhVienNhapHocEntity</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateDeleteCommand(SinhVienNhapHocEntity o){
			string strSQL="DELETE   FROM [SinhVienNhapHoc]   WHERE [SinhVienNhapHoc].[SinhVienNhapHoc_ID]=@SinhVienNhapHoc_ID";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			if(o.IsNullSinhVienNhapHoc_ID)
				this.CreateCommandParameter(cmd,"@SinhVienNhapHoc_ID",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@SinhVienNhapHoc_ID",o.SinhVienNhapHoc_ID);


			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: DeleteAll</para>
		/// <para>Input: </para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool DeleteAll(){
			IDbCommand cmd=this.CreateDeleteAllCommand();
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: CreateDeleteByPrimaryKeyCommand</para>
		/// <para>Input: SinhVienNhapHoc_ID</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateDeleteByPrimaryKeyCommand(int SinhVienNhapHoc_ID){
			string strSQL="DELETE   FROM [SinhVienNhapHoc]   WHERE [SinhVienNhapHoc].[SinhVienNhapHoc_ID]=@SinhVienNhapHoc_ID";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			this.CreateCommandParameter(cmd,"@SinhVienNhapHoc_ID",SinhVienNhapHoc_ID);



			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: CreateDeleteByKeyCommand</para>
		/// <para>Input: ColumnName , ColumnValue</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateDeleteByKeyCommand(string ColumnName,object Value){
			string strSQL="DELETE   FROM [SinhVienNhapHoc]   WHERE [SinhVienNhapHoc].["+ColumnName+"]=@ColumnName";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			this.CreateCommandParameter(cmd,"@ColumnName",Value);



			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: Delete</para>
		/// <para>Input: SinhVienNhapHocEntity</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool Delete(SinhVienNhapHocEntity o){
			IDbCommand cmd=this.CreateDeleteCommand(o);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: DeleteByID</para>
		/// <para>Input: SinhVienNhapHoc_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool DeleteByID(int SinhVienNhapHoc_ID){
			IDbCommand cmd=this.CreateDeleteByPrimaryKeyCommand(SinhVienNhapHoc_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		#endregion

		#region Select join to KhoaHocNganhHocSinhVien functions
		#endregion

		#region Select join to KhoaHoc functions
		#endregion

		#region Select join to NganhHoc functions
		#endregion

		#region Select join to SinhVien functions
		#endregion

		#region Select,delete by SinhVienNhapHoc_ID functions
		#endregion

		#region Select,delete by SinhVien_ID functions
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: SelectAllBySinhVien_ID</para>
		/// <para>Input: SinhVien_ID</para>
		/// <para>Output: List of SinhVienNhapHocEntity</para>
		///</summary>
		public List<SinhVienNhapHocEntity> SelectAllBySinhVien_ID(int SinhVien_ID){
			IDbCommand cmd=this.CreateSelectAllByKeyCommand("SinhVien_ID",SinhVien_ID);
			return this.SelectList(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: SelectAllBySinhVien_ID</para>
		/// <para>Input: SinhVien_ID</para>
		/// <para>Output: DataSet</para>
		///</summary>
		public DataSet SelectAllDSBySinhVien_ID(int SinhVien_ID){
			IDbCommand cmd=this.CreateSelectAllByKeyCommand("SinhVien_ID",SinhVien_ID);
			return this.SelectDS(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: SelectAllBySinhVien_ID</para>
		/// <para>Input: SinhVien_ID</para>
		/// <para>Output: List of SinhVienNhapHocEntity</para>
		///</summary>
		public List<SinhVienNhapHocEntity> SelectAllBySinhVien_IDFilter(string strFilter,int SinhVien_ID){
			IDbCommand cmd=this.CreateSelectAllByKeyFilterCommand(strFilter,"SinhVien_ID",SinhVien_ID);
			return this.SelectList(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: SelectAllBySinhVien_ID</para>
		/// <para>Input: SinhVien_ID</para>
		/// <para>Output: DataSet</para>
		///</summary>
		public DataSet SelectAllDSBySinhVien_IDFilter(string strFilter,int SinhVien_ID){
			IDbCommand cmd=this.CreateSelectAllByKeyFilterCommand(strFilter,"SinhVien_ID",SinhVien_ID);
			return this.SelectDS(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: DeleteBySinhVien_ID</para>
		/// <para>Input: SinhVien_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool DeleteBySinhVien_ID(int SinhVien_ID){
			IDbCommand cmd=this.CreateDeleteByKeyCommand("SinhVien_ID",SinhVien_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		#endregion

		#region Select,delete by NganhHoc_ID functions
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: SelectAllByNganhHoc_ID</para>
		/// <para>Input: NganhHoc_ID</para>
		/// <para>Output: List of SinhVienNhapHocEntity</para>
		///</summary>
		public List<SinhVienNhapHocEntity> SelectAllByNganhHoc_ID(int NganhHoc_ID){
			IDbCommand cmd=this.CreateSelectAllByKeyCommand("NganhHoc_ID",NganhHoc_ID);
			return this.SelectList(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: SelectAllByNganhHoc_ID</para>
		/// <para>Input: NganhHoc_ID</para>
		/// <para>Output: DataSet</para>
		///</summary>
		public DataSet SelectAllDSByNganhHoc_ID(int NganhHoc_ID){
			IDbCommand cmd=this.CreateSelectAllByKeyCommand("NganhHoc_ID",NganhHoc_ID);
			return this.SelectDS(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: SelectAllByNganhHoc_ID</para>
		/// <para>Input: NganhHoc_ID</para>
		/// <para>Output: List of SinhVienNhapHocEntity</para>
		///</summary>
		public List<SinhVienNhapHocEntity> SelectAllByNganhHoc_IDFilter(string strFilter,int NganhHoc_ID){
			IDbCommand cmd=this.CreateSelectAllByKeyFilterCommand(strFilter,"NganhHoc_ID",NganhHoc_ID);
			return this.SelectList(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: SelectAllByNganhHoc_ID</para>
		/// <para>Input: NganhHoc_ID</para>
		/// <para>Output: DataSet</para>
		///</summary>
		public DataSet SelectAllDSByNganhHoc_IDFilter(string strFilter,int NganhHoc_ID){
			IDbCommand cmd=this.CreateSelectAllByKeyFilterCommand(strFilter,"NganhHoc_ID",NganhHoc_ID);
			return this.SelectDS(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: DeleteByNganhHoc_ID</para>
		/// <para>Input: NganhHoc_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool DeleteByNganhHoc_ID(int NganhHoc_ID){
			IDbCommand cmd=this.CreateDeleteByKeyCommand("NganhHoc_ID",NganhHoc_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		#endregion

		#region Select,delete by KhoaHoc_ID functions
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: SelectAllByKhoaHoc_ID</para>
		/// <para>Input: KhoaHoc_ID</para>
		/// <para>Output: List of SinhVienNhapHocEntity</para>
		///</summary>
		public List<SinhVienNhapHocEntity> SelectAllByKhoaHoc_ID(int KhoaHoc_ID){
			IDbCommand cmd=this.CreateSelectAllByKeyCommand("KhoaHoc_ID",KhoaHoc_ID);
			return this.SelectList(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: SelectAllByKhoaHoc_ID</para>
		/// <para>Input: KhoaHoc_ID</para>
		/// <para>Output: DataSet</para>
		///</summary>
		public DataSet SelectAllDSByKhoaHoc_ID(int KhoaHoc_ID){
			IDbCommand cmd=this.CreateSelectAllByKeyCommand("KhoaHoc_ID",KhoaHoc_ID);
			return this.SelectDS(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: SelectAllByKhoaHoc_ID</para>
		/// <para>Input: KhoaHoc_ID</para>
		/// <para>Output: List of SinhVienNhapHocEntity</para>
		///</summary>
		public List<SinhVienNhapHocEntity> SelectAllByKhoaHoc_IDFilter(string strFilter,int KhoaHoc_ID){
			IDbCommand cmd=this.CreateSelectAllByKeyFilterCommand(strFilter,"KhoaHoc_ID",KhoaHoc_ID);
			return this.SelectList(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: SelectAllByKhoaHoc_ID</para>
		/// <para>Input: KhoaHoc_ID</para>
		/// <para>Output: DataSet</para>
		///</summary>
		public DataSet SelectAllDSByKhoaHoc_IDFilter(string strFilter,int KhoaHoc_ID){
			IDbCommand cmd=this.CreateSelectAllByKeyFilterCommand(strFilter,"KhoaHoc_ID",KhoaHoc_ID);
			return this.SelectDS(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: DeleteByKhoaHoc_ID</para>
		/// <para>Input: KhoaHoc_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool DeleteByKhoaHoc_ID(int KhoaHoc_ID){
			IDbCommand cmd=this.CreateDeleteByKeyCommand("KhoaHoc_ID",KhoaHoc_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		#endregion

		#region Select,Delete by SinhVien_IDNganhHoc_ID
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: CreateSelectBySinhVien_IDNganhHoc_IDCommand</para>
		/// <para>Input: SinhVien_ID,NganhHoc_ID</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateSelectAllBySinhVien_IDNganhHoc_IDCommand(int SinhVien_ID,int NganhHoc_ID){
			string strSQL="SELECT  [SinhVienNhapHoc_ID],[SinhVien_ID],[NganhHoc_ID],[KhoaHoc_ID] FROM [SinhVienNhapHoc]  WHERE [SinhVienNhapHoc].[SinhVien_ID]=@SinhVien_ID AND [SinhVienNhapHoc].[NganhHoc_ID]=@NganhHoc_ID";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			this.CreateCommandParameter(cmd,"@SinhVien_ID",SinhVien_ID);


			this.CreateCommandParameter(cmd,"@NganhHoc_ID",NganhHoc_ID);



			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: SelectAllBySinhVien_IDNganhHoc_ID</para>
		/// <para>Input: SinhVien_ID,NganhHoc_ID</para>
		/// <para>Output: List of SinhVienNhapHocEntity</para>
		///</summary>
		public List<SinhVienNhapHocEntity> SelectAllBySinhVien_IDNganhHoc_ID(int SinhVien_ID,int NganhHoc_ID){
			IDbCommand cmd=this.CreateSelectAllBySinhVien_IDNganhHoc_IDCommand(SinhVien_ID,NganhHoc_ID);
			return this.SelectList(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: SelectAllBySinhVien_IDNganhHoc_ID</para>
		/// <para>Input: SinhVien_ID,NganhHoc_ID</para>
		/// <para>Output: DataSet</para>
		///</summary>
		public DataSet SelectAllDSBySinhVien_IDNganhHoc_ID(int SinhVien_ID,int NganhHoc_ID){
			IDbCommand cmd=this.CreateSelectAllBySinhVien_IDNganhHoc_IDCommand(SinhVien_ID,NganhHoc_ID);
			return this.SelectDS(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: CreateSelectBySinhVien_IDNganhHoc_IDFilterCommand</para>
		/// <para>Input: SinhVien_ID,NganhHoc_ID</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateSelectAllBySinhVien_IDNganhHoc_IDFilterCommand(string strFilter,int SinhVien_ID,int NganhHoc_ID){
			string strSQL="SELECT  [SinhVienNhapHoc_ID],[SinhVien_ID],[NganhHoc_ID],[KhoaHoc_ID] FROM [SinhVienNhapHoc]  WHERE [SinhVienNhapHoc].[SinhVien_ID]=@SinhVien_ID AND [SinhVienNhapHoc].[NganhHoc_ID]=@NganhHoc_ID AND "+RemoveInjection(strFilter);
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			this.CreateCommandParameter(cmd,"@SinhVien_ID",SinhVien_ID);


			this.CreateCommandParameter(cmd,"@NganhHoc_ID",NganhHoc_ID);



			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: SelectAllBySinhVien_IDNganhHoc_ID</para>
		/// <para>Input: SinhVien_ID,NganhHoc_ID</para>
		/// <para>Output: List of SinhVienNhapHocEntity</para>
		///</summary>
		public List<SinhVienNhapHocEntity> SelectAllBySinhVien_IDNganhHoc_IDFilter(string strFilter,int SinhVien_ID,int NganhHoc_ID){
			IDbCommand cmd=this.CreateSelectAllBySinhVien_IDNganhHoc_IDFilterCommand(strFilter,SinhVien_ID,NganhHoc_ID);
			return this.SelectList(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: SelectAllBySinhVien_IDNganhHoc_ID</para>
		/// <para>Input: SinhVien_ID,NganhHoc_ID</para>
		/// <para>Output: DataSet</para>
		///</summary>
		public DataSet SelectAllDSBySinhVien_IDNganhHoc_IDFilter(string strFilter,int SinhVien_ID,int NganhHoc_ID){
			IDbCommand cmd=this.CreateSelectAllBySinhVien_IDNganhHoc_IDFilterCommand(strFilter,SinhVien_ID,NganhHoc_ID);
			return this.SelectDS(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: CreateDeleteBySinhVien_IDNganhHoc_IDCommand</para>
		/// <para>Input: SinhVien_ID,NganhHoc_ID</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateDeleteBySinhVien_IDNganhHoc_IDCommand(int SinhVien_ID,int NganhHoc_ID){
			string strSQL="DELETE   FROM [SinhVienNhapHoc]   WHERE [SinhVienNhapHoc].[SinhVien_ID]=@SinhVien_ID AND [SinhVienNhapHoc].[NganhHoc_ID]=@NganhHoc_ID";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			this.CreateCommandParameter(cmd,"@SinhVien_ID",SinhVien_ID);


			this.CreateCommandParameter(cmd,"@NganhHoc_ID",NganhHoc_ID);



			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: DeleteBySinhVien_IDNganhHoc_ID</para>
		/// <para>Input: SinhVien_ID,NganhHoc_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool DeleteBySinhVien_IDNganhHoc_ID(int SinhVien_ID,int NganhHoc_ID){
			IDbCommand cmd=this.CreateDeleteBySinhVien_IDNganhHoc_IDCommand(SinhVien_ID,NganhHoc_ID);
			bool result=false;
			result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		#endregion

		#region Select,Delete by SinhVien_IDKhoaHoc_ID
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: CreateSelectBySinhVien_IDKhoaHoc_IDCommand</para>
		/// <para>Input: SinhVien_ID,KhoaHoc_ID</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateSelectAllBySinhVien_IDKhoaHoc_IDCommand(int SinhVien_ID,int KhoaHoc_ID){
			string strSQL="SELECT  [SinhVienNhapHoc_ID],[SinhVien_ID],[NganhHoc_ID],[KhoaHoc_ID] FROM [SinhVienNhapHoc]  WHERE [SinhVienNhapHoc].[SinhVien_ID]=@SinhVien_ID AND [SinhVienNhapHoc].[KhoaHoc_ID]=@KhoaHoc_ID";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			this.CreateCommandParameter(cmd,"@SinhVien_ID",SinhVien_ID);


			this.CreateCommandParameter(cmd,"@KhoaHoc_ID",KhoaHoc_ID);



			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: SelectAllBySinhVien_IDKhoaHoc_ID</para>
		/// <para>Input: SinhVien_ID,KhoaHoc_ID</para>
		/// <para>Output: List of SinhVienNhapHocEntity</para>
		///</summary>
		public List<SinhVienNhapHocEntity> SelectAllBySinhVien_IDKhoaHoc_ID(int SinhVien_ID,int KhoaHoc_ID){
			IDbCommand cmd=this.CreateSelectAllBySinhVien_IDKhoaHoc_IDCommand(SinhVien_ID,KhoaHoc_ID);
			return this.SelectList(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: SelectAllBySinhVien_IDKhoaHoc_ID</para>
		/// <para>Input: SinhVien_ID,KhoaHoc_ID</para>
		/// <para>Output: DataSet</para>
		///</summary>
		public DataSet SelectAllDSBySinhVien_IDKhoaHoc_ID(int SinhVien_ID,int KhoaHoc_ID){
			IDbCommand cmd=this.CreateSelectAllBySinhVien_IDKhoaHoc_IDCommand(SinhVien_ID,KhoaHoc_ID);
			return this.SelectDS(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: CreateSelectBySinhVien_IDKhoaHoc_IDFilterCommand</para>
		/// <para>Input: SinhVien_ID,KhoaHoc_ID</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateSelectAllBySinhVien_IDKhoaHoc_IDFilterCommand(string strFilter,int SinhVien_ID,int KhoaHoc_ID){
			string strSQL="SELECT  [SinhVienNhapHoc_ID],[SinhVien_ID],[NganhHoc_ID],[KhoaHoc_ID] FROM [SinhVienNhapHoc]  WHERE [SinhVienNhapHoc].[SinhVien_ID]=@SinhVien_ID AND [SinhVienNhapHoc].[KhoaHoc_ID]=@KhoaHoc_ID AND "+RemoveInjection(strFilter);
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			this.CreateCommandParameter(cmd,"@SinhVien_ID",SinhVien_ID);


			this.CreateCommandParameter(cmd,"@KhoaHoc_ID",KhoaHoc_ID);



			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: SelectAllBySinhVien_IDKhoaHoc_ID</para>
		/// <para>Input: SinhVien_ID,KhoaHoc_ID</para>
		/// <para>Output: List of SinhVienNhapHocEntity</para>
		///</summary>
		public List<SinhVienNhapHocEntity> SelectAllBySinhVien_IDKhoaHoc_IDFilter(string strFilter,int SinhVien_ID,int KhoaHoc_ID){
			IDbCommand cmd=this.CreateSelectAllBySinhVien_IDKhoaHoc_IDFilterCommand(strFilter,SinhVien_ID,KhoaHoc_ID);
			return this.SelectList(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: SelectAllBySinhVien_IDKhoaHoc_ID</para>
		/// <para>Input: SinhVien_ID,KhoaHoc_ID</para>
		/// <para>Output: DataSet</para>
		///</summary>
		public DataSet SelectAllDSBySinhVien_IDKhoaHoc_IDFilter(string strFilter,int SinhVien_ID,int KhoaHoc_ID){
			IDbCommand cmd=this.CreateSelectAllBySinhVien_IDKhoaHoc_IDFilterCommand(strFilter,SinhVien_ID,KhoaHoc_ID);
			return this.SelectDS(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: CreateDeleteBySinhVien_IDKhoaHoc_IDCommand</para>
		/// <para>Input: SinhVien_ID,KhoaHoc_ID</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateDeleteBySinhVien_IDKhoaHoc_IDCommand(int SinhVien_ID,int KhoaHoc_ID){
			string strSQL="DELETE   FROM [SinhVienNhapHoc]   WHERE [SinhVienNhapHoc].[SinhVien_ID]=@SinhVien_ID AND [SinhVienNhapHoc].[KhoaHoc_ID]=@KhoaHoc_ID";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			this.CreateCommandParameter(cmd,"@SinhVien_ID",SinhVien_ID);


			this.CreateCommandParameter(cmd,"@KhoaHoc_ID",KhoaHoc_ID);



			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: DeleteBySinhVien_IDKhoaHoc_ID</para>
		/// <para>Input: SinhVien_ID,KhoaHoc_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool DeleteBySinhVien_IDKhoaHoc_ID(int SinhVien_ID,int KhoaHoc_ID){
			IDbCommand cmd=this.CreateDeleteBySinhVien_IDKhoaHoc_IDCommand(SinhVien_ID,KhoaHoc_ID);
			bool result=false;
			result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		#endregion

		#region Select,Delete by NganhHoc_IDKhoaHoc_ID
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: CreateSelectByNganhHoc_IDKhoaHoc_IDCommand</para>
		/// <para>Input: NganhHoc_ID,KhoaHoc_ID</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateSelectAllByNganhHoc_IDKhoaHoc_IDCommand(int NganhHoc_ID,int KhoaHoc_ID){
			string strSQL="SELECT  [SinhVienNhapHoc_ID],[SinhVien_ID],[NganhHoc_ID],[KhoaHoc_ID] FROM [SinhVienNhapHoc]  WHERE [SinhVienNhapHoc].[NganhHoc_ID]=@NganhHoc_ID AND [SinhVienNhapHoc].[KhoaHoc_ID]=@KhoaHoc_ID";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			this.CreateCommandParameter(cmd,"@NganhHoc_ID",NganhHoc_ID);


			this.CreateCommandParameter(cmd,"@KhoaHoc_ID",KhoaHoc_ID);



			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: SelectAllByNganhHoc_IDKhoaHoc_ID</para>
		/// <para>Input: NganhHoc_ID,KhoaHoc_ID</para>
		/// <para>Output: List of SinhVienNhapHocEntity</para>
		///</summary>
		public List<SinhVienNhapHocEntity> SelectAllByNganhHoc_IDKhoaHoc_ID(int NganhHoc_ID,int KhoaHoc_ID){
			IDbCommand cmd=this.CreateSelectAllByNganhHoc_IDKhoaHoc_IDCommand(NganhHoc_ID,KhoaHoc_ID);
			return this.SelectList(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: SelectAllByNganhHoc_IDKhoaHoc_ID</para>
		/// <para>Input: NganhHoc_ID,KhoaHoc_ID</para>
		/// <para>Output: DataSet</para>
		///</summary>
		public DataSet SelectAllDSByNganhHoc_IDKhoaHoc_ID(int NganhHoc_ID,int KhoaHoc_ID){
			IDbCommand cmd=this.CreateSelectAllByNganhHoc_IDKhoaHoc_IDCommand(NganhHoc_ID,KhoaHoc_ID);
			return this.SelectDS(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: CreateSelectByNganhHoc_IDKhoaHoc_IDFilterCommand</para>
		/// <para>Input: NganhHoc_ID,KhoaHoc_ID</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateSelectAllByNganhHoc_IDKhoaHoc_IDFilterCommand(string strFilter,int NganhHoc_ID,int KhoaHoc_ID){
			string strSQL="SELECT  [SinhVienNhapHoc_ID],[SinhVien_ID],[NganhHoc_ID],[KhoaHoc_ID] FROM [SinhVienNhapHoc]  WHERE [SinhVienNhapHoc].[NganhHoc_ID]=@NganhHoc_ID AND [SinhVienNhapHoc].[KhoaHoc_ID]=@KhoaHoc_ID AND "+RemoveInjection(strFilter);
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			this.CreateCommandParameter(cmd,"@NganhHoc_ID",NganhHoc_ID);


			this.CreateCommandParameter(cmd,"@KhoaHoc_ID",KhoaHoc_ID);



			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: SelectAllByNganhHoc_IDKhoaHoc_ID</para>
		/// <para>Input: NganhHoc_ID,KhoaHoc_ID</para>
		/// <para>Output: List of SinhVienNhapHocEntity</para>
		///</summary>
		public List<SinhVienNhapHocEntity> SelectAllByNganhHoc_IDKhoaHoc_IDFilter(string strFilter,int NganhHoc_ID,int KhoaHoc_ID){
			IDbCommand cmd=this.CreateSelectAllByNganhHoc_IDKhoaHoc_IDFilterCommand(strFilter,NganhHoc_ID,KhoaHoc_ID);
			return this.SelectList(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: SelectAllByNganhHoc_IDKhoaHoc_ID</para>
		/// <para>Input: NganhHoc_ID,KhoaHoc_ID</para>
		/// <para>Output: DataSet</para>
		///</summary>
		public DataSet SelectAllDSByNganhHoc_IDKhoaHoc_IDFilter(string strFilter,int NganhHoc_ID,int KhoaHoc_ID){
			IDbCommand cmd=this.CreateSelectAllByNganhHoc_IDKhoaHoc_IDFilterCommand(strFilter,NganhHoc_ID,KhoaHoc_ID);
			return this.SelectDS(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: CreateDeleteByNganhHoc_IDKhoaHoc_IDCommand</para>
		/// <para>Input: NganhHoc_ID,KhoaHoc_ID</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateDeleteByNganhHoc_IDKhoaHoc_IDCommand(int NganhHoc_ID,int KhoaHoc_ID){
			string strSQL="DELETE   FROM [SinhVienNhapHoc]   WHERE [SinhVienNhapHoc].[NganhHoc_ID]=@NganhHoc_ID AND [SinhVienNhapHoc].[KhoaHoc_ID]=@KhoaHoc_ID";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			this.CreateCommandParameter(cmd,"@NganhHoc_ID",NganhHoc_ID);


			this.CreateCommandParameter(cmd,"@KhoaHoc_ID",KhoaHoc_ID);



			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: DeleteByNganhHoc_IDKhoaHoc_ID</para>
		/// <para>Input: NganhHoc_ID,KhoaHoc_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool DeleteByNganhHoc_IDKhoaHoc_ID(int NganhHoc_ID,int KhoaHoc_ID){
			IDbCommand cmd=this.CreateDeleteByNganhHoc_IDKhoaHoc_IDCommand(NganhHoc_ID,KhoaHoc_ID);
			bool result=false;
			result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		#endregion

		#region Select,Delete by SinhVien_IDNganhHoc_IDKhoaHoc_ID
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: CreateSelectBySinhVien_IDNganhHoc_IDKhoaHoc_IDCommand</para>
		/// <para>Input: SinhVien_ID,NganhHoc_ID,KhoaHoc_ID</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateSelectAllBySinhVien_IDNganhHoc_IDKhoaHoc_IDCommand(int SinhVien_ID,int NganhHoc_ID,int KhoaHoc_ID){
			string strSQL="SELECT  [SinhVienNhapHoc_ID],[SinhVien_ID],[NganhHoc_ID],[KhoaHoc_ID] FROM [SinhVienNhapHoc]  WHERE [SinhVienNhapHoc].[SinhVien_ID]=@SinhVien_ID AND [SinhVienNhapHoc].[NganhHoc_ID]=@NganhHoc_ID AND [SinhVienNhapHoc].[KhoaHoc_ID]=@KhoaHoc_ID";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			this.CreateCommandParameter(cmd,"@SinhVien_ID",SinhVien_ID);


			this.CreateCommandParameter(cmd,"@NganhHoc_ID",NganhHoc_ID);


			this.CreateCommandParameter(cmd,"@KhoaHoc_ID",KhoaHoc_ID);



			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: SelectAllBySinhVien_IDNganhHoc_IDKhoaHoc_ID</para>
		/// <para>Input: SinhVien_ID,NganhHoc_ID,KhoaHoc_ID</para>
		/// <para>Output: List of SinhVienNhapHocEntity</para>
		///</summary>
		public List<SinhVienNhapHocEntity> SelectAllBySinhVien_IDNganhHoc_IDKhoaHoc_ID(int SinhVien_ID,int NganhHoc_ID,int KhoaHoc_ID){
			IDbCommand cmd=this.CreateSelectAllBySinhVien_IDNganhHoc_IDKhoaHoc_IDCommand(SinhVien_ID,NganhHoc_ID,KhoaHoc_ID);
			return this.SelectList(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: SelectAllBySinhVien_IDNganhHoc_IDKhoaHoc_ID</para>
		/// <para>Input: SinhVien_ID,NganhHoc_ID,KhoaHoc_ID</para>
		/// <para>Output: DataSet</para>
		///</summary>
		public DataSet SelectAllDSBySinhVien_IDNganhHoc_IDKhoaHoc_ID(int SinhVien_ID,int NganhHoc_ID,int KhoaHoc_ID){
			IDbCommand cmd=this.CreateSelectAllBySinhVien_IDNganhHoc_IDKhoaHoc_IDCommand(SinhVien_ID,NganhHoc_ID,KhoaHoc_ID);
			return this.SelectDS(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: CreateSelectBySinhVien_IDNganhHoc_IDKhoaHoc_IDFilterCommand</para>
		/// <para>Input: SinhVien_ID,NganhHoc_ID,KhoaHoc_ID</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateSelectAllBySinhVien_IDNganhHoc_IDKhoaHoc_IDFilterCommand(string strFilter,int SinhVien_ID,int NganhHoc_ID,int KhoaHoc_ID){
			string strSQL="SELECT  [SinhVienNhapHoc_ID],[SinhVien_ID],[NganhHoc_ID],[KhoaHoc_ID] FROM [SinhVienNhapHoc]  WHERE [SinhVienNhapHoc].[SinhVien_ID]=@SinhVien_ID AND [SinhVienNhapHoc].[NganhHoc_ID]=@NganhHoc_ID AND [SinhVienNhapHoc].[KhoaHoc_ID]=@KhoaHoc_ID AND "+RemoveInjection(strFilter);
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			this.CreateCommandParameter(cmd,"@SinhVien_ID",SinhVien_ID);


			this.CreateCommandParameter(cmd,"@NganhHoc_ID",NganhHoc_ID);


			this.CreateCommandParameter(cmd,"@KhoaHoc_ID",KhoaHoc_ID);



			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: SelectAllBySinhVien_IDNganhHoc_IDKhoaHoc_ID</para>
		/// <para>Input: SinhVien_ID,NganhHoc_ID,KhoaHoc_ID</para>
		/// <para>Output: List of SinhVienNhapHocEntity</para>
		///</summary>
		public List<SinhVienNhapHocEntity> SelectAllBySinhVien_IDNganhHoc_IDKhoaHoc_IDFilter(string strFilter,int SinhVien_ID,int NganhHoc_ID,int KhoaHoc_ID){
			IDbCommand cmd=this.CreateSelectAllBySinhVien_IDNganhHoc_IDKhoaHoc_IDFilterCommand(strFilter,SinhVien_ID,NganhHoc_ID,KhoaHoc_ID);
			return this.SelectList(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: SelectAllBySinhVien_IDNganhHoc_IDKhoaHoc_ID</para>
		/// <para>Input: SinhVien_ID,NganhHoc_ID,KhoaHoc_ID</para>
		/// <para>Output: DataSet</para>
		///</summary>
		public DataSet SelectAllDSBySinhVien_IDNganhHoc_IDKhoaHoc_IDFilter(string strFilter,int SinhVien_ID,int NganhHoc_ID,int KhoaHoc_ID){
			IDbCommand cmd=this.CreateSelectAllBySinhVien_IDNganhHoc_IDKhoaHoc_IDFilterCommand(strFilter,SinhVien_ID,NganhHoc_ID,KhoaHoc_ID);
			return this.SelectDS(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: CreateDeleteBySinhVien_IDNganhHoc_IDKhoaHoc_IDCommand</para>
		/// <para>Input: SinhVien_ID,NganhHoc_ID,KhoaHoc_ID</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateDeleteBySinhVien_IDNganhHoc_IDKhoaHoc_IDCommand(int SinhVien_ID,int NganhHoc_ID,int KhoaHoc_ID){
			string strSQL="DELETE   FROM [SinhVienNhapHoc]   WHERE [SinhVienNhapHoc].[SinhVien_ID]=@SinhVien_ID AND [SinhVienNhapHoc].[NganhHoc_ID]=@NganhHoc_ID AND [SinhVienNhapHoc].[KhoaHoc_ID]=@KhoaHoc_ID";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			this.CreateCommandParameter(cmd,"@SinhVien_ID",SinhVien_ID);


			this.CreateCommandParameter(cmd,"@NganhHoc_ID",NganhHoc_ID);


			this.CreateCommandParameter(cmd,"@KhoaHoc_ID",KhoaHoc_ID);



			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: DeleteBySinhVien_IDNganhHoc_IDKhoaHoc_ID</para>
		/// <para>Input: SinhVien_ID,NganhHoc_ID,KhoaHoc_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool DeleteBySinhVien_IDNganhHoc_IDKhoaHoc_ID(int SinhVien_ID,int NganhHoc_ID,int KhoaHoc_ID){
			IDbCommand cmd=this.CreateDeleteBySinhVien_IDNganhHoc_IDKhoaHoc_IDCommand(SinhVien_ID,NganhHoc_ID,KhoaHoc_ID);
			bool result=false;
			result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		#endregion

		#region MapObject functions
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:07/08/2010 25:01:52</para>
		/// <para>Name: MapObject</para>
		/// <para>Input: IDataReader</para>
		/// <para>Output: SinhVienNhapHocEntity</para>
		///</summary>
		protected override SinhVienNhapHocEntity MapObject(IDataReader r){
			SinhVienNhapHocEntity entity = new SinhVienNhapHocEntity();
			try{
				if(r.FieldCount>0){
					try
					{
						int ordinal = r.GetOrdinal("SinhVienNhapHoc_ID");
						if (!r.IsDBNull(ordinal)) entity.SinhVienNhapHoc_ID = ((int)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("SinhVien_ID");
						if (!r.IsDBNull(ordinal)) entity.SinhVien_ID = ((int)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("NganhHoc_ID");
						if (!r.IsDBNull(ordinal)) entity.NganhHoc_ID = ((int)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("KhoaHoc_ID");
						if (!r.IsDBNull(ordinal)) entity.KhoaHoc_ID = ((int)(r.GetValue(ordinal)));
					}
					catch{}
					return entity;
				}
			}catch{}
			return null;
		}
		#endregion
	}
	/*****************************************************************************************************/
	/**********************************END SinhVienNhapHocDAOBase*****************************************/
	/*****************************************************************************************************/
}

